package com.cwl.pattern.装饰模式;

/**
 * @program: pattern
 * @description: 装饰者类
 * @author: ChenWenLong
 * @create: 2019-06-25 17:34
 **/
public class Decorator extends Component{

    private Component component;

    @Override
    public void opeartion() {
        if (component !=null){
            component.opeartion();
        }
    }

    public void setComponent(Component component) {
        this.component = component;
    }
}
